//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { MinishopSpu, MinishopSpuResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooMinishopSpuList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<MinishopSpuResponse>(`/uctoo/minishop_spu/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooMinishopSpu = async (id: string) => {
  return requestClient.get<MinishopSpu>(`/uctoo/minishop_spu/${id}`);
};

export const adductooMinishopSpu = async (data: Partial<MinishopSpu>) => {
  return requestClient.post<MinishopSpu>('/uctoo/minishop_spu/add', data);
};

export const edituctooMinishopSpu = async (data: Partial<MinishopSpu>) => {
  return requestClient.post<MinishopSpu>('/uctoo/minishop_spu/edit', data);
};

export const deleteuctooMinishopSpu = async (id: string) => {
  return requestClient.post<any>('/uctoo/minishop_spu/del', { id });
};
